#include <stdio.h>
#define LEN 10
int find_max_index(double nums[], int n);
int main(void)
{
    double nums [LEN] = { 3.2, 1.0, 9.9, 6.6, 5.1, 2.0, 8.3, 0.2, 4.1, 7.0};
    int ans;

    ans = find_max_index(nums, LEN);
    printf("max number index is %d\n", ans);

    return 0;
}

int find_max_index(double nums[], int n)
{
    int i; 
    int max_index = 0;

    for (i = 0; i < n; i++)
    {
        if (nums[max_index] < nums[i])       
            max_index = i;
    }
    return max_index;
}